package com.itheima.demo.demo12;

import java.util.ArrayList;
import java.util.function.Function;

public class LamaList {
    public static void main(String[] args) {
    method((s)->{
        ArrayList<String>list=new ArrayList<>();
      list.add(s);
        return list;
    });
    }

    private static void method(Function<String,ArrayList<String>>list) {
        ArrayList<String> l = list.apply("讲文明树新风");
        for (String s : l) {
            System.out.println(l);
        }

    }

}
